<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "product_detail".
 *
 * @property string $product_detail_id
 * @property integer $product_id
 * @property string $goods_code
 * @property string $spec_desc
 * @property double $cost_price
 * @property string $stock_price
 * @property string $	barcode
 */
class ProductDetail extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'd_try.product_detail';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['product_id'], 'integer'],
            [['cost_price', 'stock_price'], 'number'],
            [['goods_code'], 'string', 'max' => 60],
            [['spec_desc'], 'string', 'max' => 120],
            [['	barcode'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'product_detail_id' => 'Product Detail ID',
            'product_id' => 'Product ID',
            'goods_code' => 'Goods Code',
            'spec_desc' => 'Spec Desc',
            'cost_price' => 'Cost Price',
            'stock_price' => 'Stock Price',
            '	barcode' => 'Barcode',
        ];
    }


}
